﻿<UserControl
    x:Class="Markup.Programming.Samples.ResourceObjectSample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:p="http://markupprogramming.codeplex.com/markup/programming"
    Height="300" Width="300">
    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.Resources>
            <p:ResourceObject x:Key="SampleData">
                <p:Property PropertyName="FirstName" Value="Bill"/>
                <p:Property PropertyName="LastName" Value="Smith"/>
            </p:ResourceObject>
        </Grid.Resources>
        <Grid.DataContext>
            <Binding Path="Value" Source="{StaticResource SampleData}"/>
        </Grid.DataContext>
        <StackPanel>
            <TextBlock Text="{Binding FirstName}"/>
            <TextBlock Text="{Binding LastName}"/>
        </StackPanel>
    </Grid>
</UserControl>
